package cn.test.my.juc;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;

/**
 * @author summit
 * @since 2021/8/11 17:13
 */
public class All {

	public static void main(String[] args) {
		ExecutorService executorService = Executors.newCachedThreadPool();
		while (true) {
			executorService.submit(() -> {
				try {
					TimeUnit.SECONDS.sleep(5);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			});
		}
	}

}
